package com.cv.system;

import com.cv.framework.common.exception.ErrorCode;

/**
 * 管理系统后台错误码枚举类
 *
 * @author Charles_XDXD
 */
public interface ErrorCodeConstants {

    // ========== AUTH 模块 1-002-000-000 ==========
    ErrorCode AUTH_LOGIN_BAD_CREDENTIALS = new ErrorCode(1_002_000_000, "登录失败，账号密码不正确");
    ErrorCode AUTH_LOGIN_USER_DISABLED = new ErrorCode(1_002_000_001, "登录失败，账号被禁用");
    ErrorCode AUTH_LOGIN_USER_UNAUTHORIZED = new ErrorCode(1_002_000_002, "登录失败，账号未授权");
    ErrorCode AUTH_LOGIN_CAPTCHA_CODE_ERROR = new ErrorCode(1_002_000_004, "验证码不正确，原因：{}");

    // ========== VALIDATE 模块 1-002-001-000 ==========
    ErrorCode VALIDATE_USERNAME_EXISTS = new ErrorCode(1_002_001_000, "帐号已存在");
    ErrorCode VALIDATE_EMAIL_EXISTS = new ErrorCode(1_002_001_001, "邮箱已存在");
    ErrorCode VALIDATE_MOBILE_EXISTS = new ErrorCode(1_002_001_002, "手机号已存在");
    ErrorCode VALIDATE_OLD_PASSWORD_NOT_MATCH = new ErrorCode(1_002_001_003, "旧密码不正确");
    ErrorCode VALIDATE_USER_NOT_FOUND = new ErrorCode(1_002_001_004, "用户不存在");

    // ========== 字典类型 1-002-002-000 ==========
    ErrorCode DICT_TYPE_NOT_EXISTS = new ErrorCode(1_002_002_001, "当前字典类型不存在");
    ErrorCode DICT_TYPE_NOT_ENABLE = new ErrorCode(1_002_002_002, "字典类型不处于开启状态，不允许选择");
    ErrorCode DICT_TYPE_NAME_DUPLICATE = new ErrorCode(1_002_002_003, "已经存在该名字的字典类型");
    ErrorCode DICT_TYPE_TYPE_DUPLICATE = new ErrorCode(1_002_002_004, "已经存在该类型的字典类型");
    ErrorCode DICT_TYPE_HAS_CHILDREN = new ErrorCode(1_002_002_005, "无法删除，该字典类型还有字典数据");

    // ========== 字典数据 1-002-003-000 ==========
    ErrorCode DICT_DATA_NOT_EXISTS = new ErrorCode(1_002_003_001, "当前字典数据不存在");
    ErrorCode DICT_DATA_NOT_ENABLE = new ErrorCode(1_002_003_002, "字典数据({})不处于开启状态，不允许选择");
    ErrorCode DICT_DATA_VALUE_DUPLICATE = new ErrorCode(1_002_003_003, "已经存在该值的字典数据");

}
